package com.itheima;

import java.time.LocalDateTime;

public class Demo3 {
    public static void main(String[] args) {
        LocalDateTime now = LocalDateTime.now();

        LocalDateTime localDateTime = now.plusYears(1);

        System.out.println(localDateTime);
        withTime();
    }
    //set
    public static void withTime(){
        LocalDateTime deTime = LocalDateTime.of(2021, 7, 13, 11, 11, 11, 11);
        LocalDateTime localDateTime = deTime.withMonth(6);
        System.out.println(localDateTime);
    }
}
